package proyectoconcesionarios;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @author M.Vivó
 */
public class ConexionMySQL {
    
    public Connection Conectar(){
        Connection con=null;
        try{
            con=DriverManager.getConnection("jdbc:mysql://localhost/concesionario","root","");
        }catch(SQLException ex){
            System.out.println("Error "+ex.getMessage());
        }finally{
            return con;
        }
    }
}
